<?php get_header();?>
<main class="wrapper">
	<div class="inner appbox">	
		<div class="boxtop">
			<h2><?php single_cat_title( "", true );?></h2>
			<div class="breadcrumb">
				<?php get_breadcrumbs();?>
			</div>
		</div>
		<?php if (have_posts()) : ?>
		<div class="newslist">			
			<?php while (have_posts()) : the_post(); ?>
			<article class="newsitem">			
				<div class="pic">
					<a href="<?php the_permalink(); ?>" target="_blank" title="<?php the_title();?>" style="background-image: url(<?php get_template_part('functions/thumbnail');?>);"></a>
				</div>
				<div class="info">
					<h2><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_title();?></a></h2>
					<div class="excerpt">
					<?php echo wp_trim_words($post->post_content, 170, '...');?>
					</div>
					<div class="more">
						<a href="<?php the_permalink(); ?>" title="<?php the_title();?>">了解更多&gt;&gt;</a>
					</div>
					<div class="date">
						<time datetime="<?php the_time('Y-m-d');?>">
							<i><?php the_time('d');?></i>
							<?php the_time('Y-m');?>
						</time>
					</div>				
				</div>
			</article>
			<?php endwhile;?>
			<?php get_template_part('functions/pagenavi');?>
		</div>
		<?php else: ?>
		<div class="post">
			<p>很抱歉，该栏目下暂未添加内容，请先浏览网站其它内容！</p>
		</div>
		<?php endif;?>
	</div>
</main>
<?php get_footer();?>